<?php
/**
 * 控制器
 *
 * $Id: index.php 194 2009-09-11 08:02:46Z sunxy $
 */

if (!defined('APP_ROOT')) define('APP_ROOT', dirname(__FILE__));
if (!defined('APP_INC')) define('APP_INC', APP_ROOT . '/../../inc/');
if (!defined('APP_LIB')) define('APP_LIB', APP_ROOT . '/../../lib/');

error_reporting(0);

require_once(APP_ROOT . '/inc/config.php');
require_once(APP_ROOT . '/lib/PortalController.class.php');

$controller = new PortalController();
$controller->import = APP_ROOT . '/lib/';
$controller->config = APP_ROOT . '/inc';
$controller->application = 'portal';

$controller->left_delimiter = "{[";
$controller->right_delimiter = "]}";

if (empty($_REQUEST['tpl'])) {
	$_REQUEST['tpl'] = 'en';
}

if (empty($_REQUEST['do'])) {
	$_REQUEST['do'] = 'Portal.layout';
}

$_REQUEST['do'] = ucfirst($_REQUEST['do']);

$controller->execute($_REQUEST);
?>